package test;

import java.awt.BorderLayout;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;

import models.ModelLayoutTable;

public class testTable  extends JFrame 
{
	private static final long serialVersionUID = 1L;
	private ModelLayoutTable monModel;
	private JTable maTable;
	private JScrollPane monScroll;
	private JFrame frame;
	private JPanel panel;

	public testTable()
	{
	      panel = new JPanel(new BorderLayout());
	      this.setSize(600, 400);
	      this.add(panel);
	}
	
	public void addTable()
	{
    	String titres[] = new String[] {"COL1", "COL2", "COL3"};
    	Object data[][] = new Object[][] { {"1", "2", "3", "4"}, {"5", "6", "7", "8"}, {"9", "10", "11", "12"}, {"13", "14", "15", "16"}};
    	monModel = new ModelLayoutTable("Synthese","Titre", titres, data);
    	maTable = new JTable(monModel);
    	monScroll = new JScrollPane(maTable);
    	panel.add(monScroll);
	}
	
	public static void main(String args[])
	{
		 testTable tt = new testTable();
		 tt.addTable();
		 tt.setVisible(true);
	}
}
